package com.example.demo.controller;

import com.example.demo.model.UserInfo;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

@Controller
public class UController {
//    @Autowired
//    @Qualifier("getUserInfo2")
    @Resource(name = "getUserInfo1")
    private UserInfo userInfo;

    public void sayHi(){
        userInfo.getUserInfo();
        System.out.println("hi, UController...");
    }
}
